Robert Lipe [Sun, 27 Dec 2020 09:13:10 +0000 (03:13 -0600)]
Modernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.
tsteven4 [Tue, 10 Nov 2020 20:31:00 +0000 (13:31 -0700)]
update mac, linux docker qtio builds to 5.12.10. (#650)
* update mac Qt 5.12 build to 5.12.10.
* update qtio docker build to qt 5.12.10
tsteven4 [Sun, 8 Nov 2020 17:51:41 +0000 (10:51 -0700)]
fix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)
tsteven4 [Sun, 8 Nov 2020 16:26:23 +0000 (09:26 -0700)]
Create codeql-analysis.yml (#648)
* Create codeql-analysis.yml
* Update codeql-analysis.yml
tsteven4 [Thu, 10 Sep 2020 16:52:03 +0000 (10:52 -0600)]
update build to Qt 5.15.1 from 5.15.0 (#642)
tsteven4 [Tue, 8 Sep 2020 16:32:45 +0000 (10:32 -0600)]
eliminate duplicate ignrando test. (#641)
tsteven4 [Sun, 30 Aug 2020 20:26:54 +0000 (14:26 -0600)]
backward compatible changes for Qt6. (#640)
* backward compatible changes for Qt6.
This is mostly QRegExp -> QRegularExpression.
Some QRegExp usage was was replaced by QString::trimmed.
There is also a QNetworkRequest redirect attribute change that is backward
compatible to Qt5.9.
* eliminate usage of unnecessary regular expressions.
* bring serial_unix into Qt6 compliance.
QSet::toList is gone, QSet::values is identical.
qSort is deprecated.
tsteven4 [Sat, 29 Aug 2020 19:37:14 +0000 (13:37 -0600)]
add ability to disable map preview in GUI (#635)
* add CONFIG option to disable map preview feature.
* additional excludes for disabled map preview
tsteven4 [Fri, 28 Aug 2020 11:50:07 +0000 (05:50 -0600)]
Fix potential segmentation faults with exif. (#639)
1. A pointer exif_app_ to an ExifApp on QList<ExifApp> exif_apps was saved.
After this the list was modified. This can lead to the saved pointer becoming
invalid.
2. The ExifApp structure had a dtor, but no other special functions, i.e. it
violated the rule of 3 and the rule of 5. Operations on QList<ExifApp> may
cause an ExifApp on the list to be copied or destroyed. If an ExifApp is
destroyed, then the ExifApp dtor would close the files, even though there could
be a copy of the ExifApp expecting the files still to be open.
This scenerio occured with Qt6, causing segmentation faults in exif.test.
tsteven4 [Thu, 27 Aug 2020 18:05:37 +0000 (12:05 -0600)]
fix hiketech datetime bug, prepare for toTime_t override (#638)
* correct hiketech written time values.
the mystery previously noted in the code was due to the use of the %I format
specifier which prints out the hour using a 12 hour clock.
note that it is easy to see the times in the reference files were wrong. the
times in the first reference file, expertgpx.gpx, are in UTC. This is always
true for gpx, and is indicated as well by the Z. the times in the hiketech file
appear in a utc element, so they must be in UTC as well.
this eliminates the usage of QDateTime::toTime_t which is obsolete.
* elimnate remaining uses of obsolete QDateTime::toTime_t
This sounds better than it is, we added uses of gpsbabel::DateTime::toTime_t.
But we control that and can add our own toTime_t.
tsteven4 [Tue, 25 Aug 2020 20:48:21 +0000 (14:48 -0600)]
remove unintentional collision with errno. (#636)
this caused compiler failures with gnu++1z.
tsteven4 [Mon, 24 Aug 2020 17:45:42 +0000 (11:45 -0600)]
more gperf removal (#634)
* more gperf removal.
This also makes the xcsv_token table private.
* restore functionality of style file options
and avoid unnecessary enum conversions.
* expicitly pass default value for xcsv_tokens value lookup.
tsteven4 [Mon, 24 Aug 2020 16:58:30 +0000 (10:58 -0600)]
merge selected upstream changes for upload.sh (#633)
this restores uploads for PRs, but to transfersh.com instead of transfer.sh.
add atrifactory deploy script to upload Qt images.
Robert Lipe [Mon, 24 Aug 2020 06:30:48 +0000 (01:30 -0500)]
Allow client retry on a redirect of an upgrade check.
Not in this CL, server side change to NOT force an http->https upgrade
on this one URL.
Robert Lipe [Mon, 24 Aug 2020 04:37:15 +0000 (23:37 -0500)]
Merge branch 'master' of https://github.com/gpsbabel/gpsbabel
GPSBabel [Mon, 24 Aug 2020 03:15:29 +0000 (22:15 -0500)]
Remove dependency on gperf. (#631)
* Remove dependency on gperf.
There may be more "computer sciency" ways to do this, but let's start here.
Smallest cut possible for removal. Throwing this into CI to plan for actual
removal.
It seems like xcsv_tokens should be more const-able (constexpr?). If necessary,
we can defer this initialization from a global created at startup to being
only inflated when needed. Let's see.
* Bludgeon in temporary better handling for LAT_10E and friends.
* Prepare to die!
* Drop xcsv_tokens.cc and xcsv_tokens.gperf.
* Drop xcsv_tokens.in.
* Remove Steven's shiny new code to run gperf.
Collision with trunk. Oops.
* Pick up xcsv.cc, xcsv.h which were dropped.
tsteven4 [Sat, 22 Aug 2020 11:56:53 +0000 (05:56 -0600)]
Migrate some RegExs to QRegularExpression. (#632)
QRegExp will be/is deprecated.
tsteven4 [Fri, 14 Aug 2020 22:47:24 +0000 (16:47 -0600)]
add fedora CI build, drop xenial (#630)
* add fedora CI build
* drop travis xenial build.
tsteven4 [Fri, 14 Aug 2020 22:41:03 +0000 (16:41 -0600)]
compile in gpsbabel translations and map on non mac unix distribution… (#622)
* compile in gpsbabel translations and map on non mac unix distributions by default.
This eliminates the need to install gpsbabelfe_*.qm, gpsbabel_*.qm and
gmapbase.html on the system.
Note that the Qt supplied translations must still be installed on the system.
The Qt translations may be in a package like qttranslations5-l10n or
qt5-qttranslations.
* simplify optional resources using std methods.
* discuss dependencies in INSTALL.
tsteven4 [Fri, 14 Aug 2020 19:57:32 +0000 (13:57 -0600)]
add some explicit docbook ids (#629)
this makes the generated html more reproducible as random ids
aren't generated.
tsteven4 [Tue, 11 Aug 2020 18:23:18 +0000 (12:23 -0600)]
remove autotools (#626)
tsteven4 [Tue, 11 Aug 2020 16:25:33 +0000 (10:25 -0600)]
add macos qt 5.15.0 build with artifactory image. (#624)
tsteven4 [Fri, 7 Aug 2020 18:55:09 +0000 (12:55 -0600)]
move linux CI from configure to qmake. (#613)
- Add recipe for internal_styles.cc, xcsv_tokens.gperf, gui, unix-gui, toolinfo to GPSBabel.pro.
- Add support for text substitution in setup.iss and gbversion.h to GPSBabel.pro.
- fix qmake warnings from "qmake -Wall".
- split recipes for documents into scripts.
- shellcheck fixes for fixdoc, mkcapabilities.
- parallel build for coverage.
- add INSTALL file with build instructions.
- sort document targets into ones for general consumption (gpsbabel.html, gpsbabel.pdf) and one to support www.gpsbabel.org (now gpsbabel.org instead of index.html).
tsteven4 [Fri, 7 Aug 2020 17:29:22 +0000 (11:29 -0600)]
fix i386 regression error with engima. (#620)
this was motivated by the test failure seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=
1596794554&raw=0
tsteven4 [Fri, 7 Aug 2020 13:38:47 +0000 (07:38 -0600)]
use Qt endian detetion. (#619)
This frees us from AC_C_BIGENDIAN which conditionally defined WORDS_BIGENDIAN.
The defintion of WORDS_BIGENDIAN was and is not handled by GPSBabel.pro.
tsteven4 [Fri, 7 Aug 2020 13:34:42 +0000 (07:34 -0600)]
fix endianness/packing issues with energympro, globalsat_sport. (#618)
this was motivated by test failures seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=s390x&ver=1.7.0%2Bds-3&stamp=
1594393020&raw=0
tsteven4 [Tue, 4 Aug 2020 13:46:19 +0000 (07:46 -0600)]
cleanup README.md (#614)
* update travis url to reflect move from .org to .com
* remove duplicate codacy badge and fix markup error.
* add appveyor status badge.
tsteven4 [Sun, 2 Aug 2020 16:06:30 +0000 (10:06 -0600)]
fix a few gcc10 warnings.
tsteven4 [Sun, 2 Aug 2020 15:00:09 +0000 (09:00 -0600)]
fix lupdate warning. (#617)
With Qt 5.12.9 the lupdate command in package_app could print a warning:
/home/strabert/work/pkgconfig/gui/preferences.cc:28: Discarding unconsumed meta data
Viet-Tam Luu [Sat, 1 Aug 2020 19:57:22 +0000 (12:57 -0700)]
Fix NMEA parsing creating Null Island waypoints (#607)
* Fix NMEA parsing creating Null Island waypoints
Fix parsing of NMEA GPGGA sentences: ones with 0 "fix quality" (i.e. "invalid") are allowed in serial (i.e. live GPS) mode because (according to the comment) some GPS devices will report previously-read data in the absence of a current good fix. Adjust this allowance to require an actual coordinate value; at least one popular USB GPS device will issue GPGGA such as "$GPGGA,010222.00,,,,,0,00,99.99,,,,,,*65" if it loses a good fix, and the empty lat/lng coordinates (",,,,,") are parsed as 0N 0W (a.k.a. "Null Island"). QString::toDouble() won't report a problem with an empty input so we simply check for 0 lat/lng.
* Use "ok" QString::toDouble() argument instead
... of checking for checking for both lat & lng exactly zero, as `ok` does indeed get set to `false` on empty inputs, in recent Qt versions.
* Revert "Use "ok" QString::toDouble() argument instead"
This reverts commit
d226d01c862606615aa599f5d3b649cea12f0700.
tsteven4 [Sat, 1 Aug 2020 14:06:27 +0000 (08:06 -0600)]
fix error detection for osx script, allow macOS sed for mkstyle. (#615)
tsteven4 [Mon, 27 Jul 2020 23:44:14 +0000 (17:44 -0600)]
support doc creation in qmake. (#609)
* support doc creation in qmake.
pass parameters to tools/mkcapabilites instead of
using text replacement in configure.
text replacement in xmldoc/makedoc was unnecessary, directory
creation is handled in the recipee.
there is some foolishness in GPSBabel.pro to allow overriding of
WEB and DOCVERSION on the command line of make. If those values
are known when running qmake it could be slightly simpler.
* remove dependency on makedoc.in.
* improve fop comments.
* further update fop comments
tsteven4 [Mon, 27 Jul 2020 23:16:33 +0000 (17:16 -0600)]
support parallel vtesto from qmake. (#612)
* support parallel vtesto from qmake.
also support testo, vtesto with out of source builds.
* force check to run.
tsteven4 [Mon, 27 Jul 2020 21:25:22 +0000 (15:25 -0600)]
support third party library configuration in qmake (#611)
* add qmake options to specify libraries.
* fix no libusb along lines of #610
* correct inclusion of shapelib headers.
* more closely match original includes
instead of trying to use HAVE_*, ENABLED_* *_INHIBITED and
-I options in a consistent manner.
We can revisit this after the demise of configure.
* add qmake message when libusb is disabled.
Vlad Wing [Sat, 25 Jul 2020 12:20:36 +0000 (13:20 +0100)]
Update gpsusbstub.cc (#610)
Build fails when configured `--without-libusb`:
```
jeeps/gpsusbstub.cc:39:3: error: ‘Fatal’ was not declared in this scope
Fatal() << no_usb;
^~~~~
jeeps/gpsusbstub.cc:39:3: note: suggested alternative: ‘fatal’
Fatal() << no_usb;
^~~~~
fatal
```
tsteven4 [Wed, 8 Jul 2020 21:58:18 +0000 (15:58 -0600)]
fix spelling errors flagged by https://lintian.debian.org/sources/gpsbabel/1.6.0+ds-11.html (#604)
also remove gpsbabel executable that should never have been checked in.
Robert Lipe [Mon, 6 Jul 2020 17:15:58 +0000 (12:15 -0500)]
Replace xxx with nnn for clarity
tsteven4 [Mon, 6 Jul 2020 12:38:58 +0000 (06:38 -0600)]
Release candidate (#602)
* prep for release 1.7.0.
* update reference files for release.
* use windows resource compiler scripts for CLI and GUI.
These rc scripts are used to set the icon the OS sees and to supply
version information that is shown by windows explorer.
* correct file permissions.
* update rc copyright
Robert Lipe [Fri, 3 Jul 2020 16:37:01 +0000 (11:37 -0500)]
Prevent crash building PDF on MacOS when there's not a missing
SOMETHING to go with this ID tag. We don't seem to need it. Gone.
lintondf [Wed, 1 Jul 2020 00:07:09 +0000 (20:07 -0400)]
Write garmin specific ilinks as gpxx:rpt elements (#598)
* Write garmin specific ilinks as gpxx:rpt elements when garminextensions option is specified
* incorporate code review comments
* comment corrected to reflect element being closed
Markus Wamser [Fri, 26 Jun 2020 14:25:41 +0000 (16:25 +0200)]
yum -> apt in Ubuntu instructions (#599)
tsteven4 [Thu, 18 Jun 2020 00:29:45 +0000 (18:29 -0600)]
update macos, linux builds to use Qt 5.12.9 (#596)
* switch macos to Qt 5.12.9
* rebuild docker images
tsteven4 [Wed, 10 Jun 2020 11:20:08 +0000 (05:20 -0600)]
Adjust gdb reader duration handling (#595)
* experiment with filtering gdb waypoints.
* formalize new gdb option to avoid creation of waypoints
from non-user points.
Also, don't fill in the description when processing durations. This
interacted undesirably with the roadbook option.
* fix reference files.
* simplify bool option processing in gdb, new ref files.
* fix reference files again.
* contrast the gdb dropwpt option with the via option
tsteven4 [Mon, 8 Jun 2020 07:16:48 +0000 (01:16 -0600)]
clean up some cppcheck warnings in gdb. (#594)
lintondf [Sun, 7 Jun 2020 22:19:10 +0000 (18:19 -0400)]
Extract expected travel durations from Garmin BaseCamp GDB output (#585)
* extract track segment expected travel durations from Garmin BaseCamp autorouted GDB exports and report as <rtept/src> elements in gpx output
* revised to use Garmin Format-Specific Data object to store durations
* generate at frozen test time
* include code review suggestions
* store Garmin BaseCamp autoroute waypoint travel durations in the <desc> elements of <rtept> waypoints; modify gpx ouptut to exclude autoroute generated rtept waypoints from initial waypoint list
* remove waypoint class lookup and replace tabs with spaces
* run astyle on gdb.cc
* turn off detailed GDB debugging
Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
tsteven4 [Sun, 7 Jun 2020 16:56:18 +0000 (10:56 -0600)]
fix Uncaught TypeError: map.checkResize is not a function (#593)
* fix Uncaught TypeError: map.checkResize is not a function
with GUI map preview.
* remove extra newline from map preview javascript.
* tighten up js generation.
* tighten up js some more.
* tweak js generation.
tsteven4 [Sat, 6 Jun 2020 16:44:04 +0000 (10:44 -0600)]
fix segmentation fault in GUI map preview. (#592)
tsteven4 [Fri, 5 Jun 2020 19:21:34 +0000 (13:21 -0600)]
refactor logging (#582)
* refactor logging to
allow the noreturn attribute on fatal() to be used by analysis
tools while still generating messages with an output stream.
* Add our own message handler.
This allows us to use stderr on windows. The default message handler
routes QDebug messages to the debugger on windows.
* flush stdout before message logger writes to stderr.
* flush stdout before writing to standard error for fatal().
or else messages can appear in the wrong order on Windows.
GPSBabel [Thu, 4 Jun 2020 07:46:11 +0000 (02:46 -0500)]
Remove Mapsource .mps format (#588)
* Fix numerous instances of shadowing confusion.
Inspired by a cppcon talk and our recent conversations about warnings, I
took a closer look at shadowing variables in our code and I wasn't proud
of my findings.
We had a lot of code that was writing to local variables or function
arguments when it thought it was operating on globals or (soon)
method-member variables. I made a rather half-hearted pass at changing
this by splitting up huge functions, renaming arguments, renaming globals
to reflect their future status as method variables (foo_), and generally
cleaning things up. The amound of effort I spent on each format was
approximately equal to its expected lifespan - I'm not spending an hour
on cleanups on formats I should instead be deleting.
In a future submit, I'll try to find some combination of -W flags on
our targets that allows us to not regress easily.
* Fix merge conflict I just created in gdb.cc
* Delete workspace.xml
* Delete the same link in garmin_icons.xml that I deleted twice yesterday.
Fix more esoteric warnings.
* Reapply MORE of yesterday's commits.
Seriously, I know this has been committed and is in HEAD...
* Attempt to fix list detachment within route.cc
* Remove Mapsource
The Mapsource format has been deprecated by Garmin for something
like 15 years. Later versions of Mapsource used GDB and Basecamp,
Garmin's first replacement for the Mapsource lineage, was used
exclusively in later versions.
I've reviewed list traffic and floated a discussion on the list.
The code style was never really very flexible and it it bears
a high maintenance cost that we can no longer afford. This
format is dead.
* Remove more pieces of Mapsource.
* Change Netstumbler test to not use Mapsource for staging.
More cleanups.
* Fix netstumbler so I can delete Mapsource. Ugh.
* Update netstumbler with IWYU.
tsteven4 [Wed, 3 Jun 2020 11:11:04 +0000 (05:11 -0600)]
use http for upgrade (#587)
* test "TLS initialization failed" issue on windows.
* https ok with desktop services.
tsteven4 [Mon, 1 Jun 2020 20:50:26 +0000 (14:50 -0600)]
fix Qt 5.15.0 Wdeprecated-declarations warnings for (#584)
QXmlDefaultHandler
QXmlInputSource
QXmlSimpleReader
as suggested use QXmlStreamReader instead.
tsteven4 [Mon, 1 Jun 2020 20:49:29 +0000 (14:49 -0600)]
convert osm to format class (#579)
* convert osm to Format class.
* use static function cb w/o lambdas.
tsteven4 [Mon, 1 Jun 2020 18:55:10 +0000 (12:55 -0600)]
clean up mkstyle.sh (#578)
as suggested by shellcheck used $() instead of backticks,
and double quote to prevent globbing and word splitting.
mkstyle.sh now works if the directory path contains a space.
drop the failed attempt to exclude custom.style. This resolves #577
drop the exclusion of README.style, which hasn't existed for a long time.
use basename to drop the suffix instead of piping to sed.
tsteven4 [Mon, 1 Jun 2020 11:26:31 +0000 (05:26 -0600)]
fix Qt 5.15.0 Wdeprecated-declarations warnings for (#583)
QTime::start()
QTime::elapsed()
tsteven4 [Mon, 1 Jun 2020 11:18:49 +0000 (05:18 -0600)]
make garmin_tables const (#576)
and clean up mkicondoc cppcheck errors.
tsteven4 [Thu, 28 May 2020 14:22:47 +0000 (08:22 -0600)]
Merge pull request #574 from tsteven4/guict
clang-tidy fixes for GUI
tsteven4 [Wed, 27 May 2020 20:37:09 +0000 (14:37 -0600)]
clang-tidy readability-isolate-declaration on gui.
tsteven4 [Wed, 27 May 2020 20:31:23 +0000 (14:31 -0600)]
clang tidy modernize-use-auto on gui.
tsteven4 [Wed, 27 May 2020 20:27:20 +0000 (14:27 -0600)]
clang tidy modernize-redundant-void-arg on gui.
tsteven4 [Wed, 27 May 2020 19:48:15 +0000 (13:48 -0600)]
clang-tidy readability-redundant-member-init on gui.
GPSBabel [Wed, 27 May 2020 03:31:16 +0000 (22:31 -0500)]
Fix numerous instances of shadowing confusion. (#570)
Fix numerous instances of shadowing confusion.
Inspired by a cppcon talk and our recent conversations about warnings, I
took a closer look at shadowing variables in our code and I wasn't proud
of my findings.
We had a lot of code that was writing to local variables or function
arguments when it thought it was operating on globals or (soon)
method-member variables. I made a rather half-hearted pass at changing
this by splitting up huge functions, renaming arguments, renaming globals
to reflect their future status as method variables (foo_), and generally
cleaning things up. The amound of effort I spent on each format was
approximately equal to its expected lifespan - I'm not spending an hour
on cleanups on formats I should instead be deleting.
In a future submit, I'll try to find some combination of -W flags on
our targets that allows us to not regress easily.
tsteven4 [Mon, 25 May 2020 17:52:58 +0000 (11:52 -0600)]
Fail configuration if libusb-1.0 is not found (#564)
* have configure fail if libusb is enabled and not found.
* correct indentation in configure.
Jochen Sprickerhof [Mon, 25 May 2020 15:08:13 +0000 (17:08 +0200)]
Use strncmp to compare array to string (#545)
tsteven4 [Mon, 25 May 2020 11:55:37 +0000 (05:55 -0600)]
fix -Wsizeof-pointer-memaccess in garmin_gpi reader. (#569)
again, this really wasn't a problem. The destination and the
source had the same size. But we can do better.
GPSBabel [Mon, 25 May 2020 07:51:01 +0000 (02:51 -0500)]
Merge pull request #567 from gpsbabel/bye_psitrex
Remove PSITrex, which has been unused for many years.
Robert Lipe [Mon, 25 May 2020 04:09:25 +0000 (23:09 -0500)]
Merge branch 'bye_psitrex' of https://github.com/gpsbabel/gpsbabel into bye_psitrex
Robert Lipe [Mon, 25 May 2020 03:42:29 +0000 (22:42 -0500)]
Don't refer to PSITtext in reference files.
Robert Lipe [Mon, 25 May 2020 03:40:55 +0000 (22:40 -0500)]
More remnants of PSITrex.
Robert Lipe [Mon, 25 May 2020 03:38:11 +0000 (22:38 -0500)]
Garmin_icons in doc can't refer to psitrex any longer.
GPSBabel [Mon, 25 May 2020 03:34:35 +0000 (22:34 -0500)]
Cleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:34:16 +0000 (22:34 -0500)]
Cleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:33:46 +0000 (22:33 -0500)]
Cleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:31:53 +0000 (22:31 -0500)]
Actually prepare PSITrex deletion for cleanup
tsteven4 [Mon, 25 May 2020 01:31:08 +0000 (19:31 -0600)]
fix -Wstringop-truncation warning in osm. (#568)
tsteven4 [Sun, 24 May 2020 16:39:01 +0000 (10:39 -0600)]
teach gdb reader to read autoroute information. (#566)
Robert Lipe [Sun, 24 May 2020 07:00:48 +0000 (02:00 -0500)]
Remove PSITrex, which has been unused for many years.
CC moved to deprecated. The rest was really removed.
tsteven4 [Sat, 23 May 2020 21:36:29 +0000 (15:36 -0600)]
fix a few -Wstringop-truncation warnings (#565)
* fix -Wstringop-truncation warning in bushnell.
* fix -Wstringop-truncation in alantrl.
* fix -Wstringop-truncation warning in garmin, and a real error.
The real error:
In garmin.cc route_hdr_pr would fail to terminate the
GPS_SWay rte_ident member if latin1 encoded route name was longer
than 255 characters. Subsequently garmin.cc route_write passes the
GPS_SWay structure to GPS_Command_Send_Route. GPS_Command_Send_Route
may call GPS_A20[01]_Send which may call GPS_D202_Send. GPS_D202_Send
assumes that rte_ident is null terminated.
The other change only silences the warning, the character array was
subsequently terminated anyway.
* fix -Wstringop-truncation warning in enigma.
These are nonstrings. They are not required to be null terminated.
A real reference file caputred from MGL Central 2.0 is added. In it
you can see that don't care values are not all filled with a particular
value. We fill them with NULLs are a result of zeroing the structure before
we write it. You can also see the 1000m offset in altitudes is correct.
* correct reference file mode.
* fix two strncpy warnings that gcc 9.3.0 doesn't issue.
Perhaps it is a gcc bug that these didn't cause warnings. It seems
to be related to the fact they were the last member in the structure.
In any event, we can copy 1 byte less, we explicitly add a terminator
subsequently.
Robert Lipe [Wed, 20 May 2020 23:43:25 +0000 (18:43 -0500)]
README.md lint cleanups.
tsteven4 [Wed, 20 May 2020 16:17:55 +0000 (10:17 -0600)]
let clang-tidy provide default member initializers (#562)
* let clang-tidy provide default memeber intializers
This is the check cppcoreguidelines-pro-type-member-init, but
it was only applied to the class declarations for our filters,
formats and vectors.
This is currently irrelevant as all these are constructed globally,
but if one constructs dynamic instances errors can be seen in gpx, kml, nmea
and lowranceusr formats.
* revert filter_vecs change which MSVC 2015 choked on.
Robert Lipe [Wed, 20 May 2020 00:21:32 +0000 (19:21 -0500)]
Clarify doc on merge filter for #407.
Robert Lipe [Wed, 20 May 2020 00:09:25 +0000 (19:09 -0500)]
Maggeo source doesn't use xmlgeneric. Delete include.
Robert Lipe [Wed, 20 May 2020 00:07:53 +0000 (19:07 -0500)]
Add redundant colon.
Robert Lipe [Wed, 20 May 2020 00:05:25 +0000 (19:05 -0500)]
Promote GPX examples in doc from simplelist to listitem.
tsteven4 [Tue, 19 May 2020 14:26:55 +0000 (08:26 -0600)]
quiet some codacy yammering about thrid party files. (#561)
tsteven4 [Tue, 19 May 2020 13:12:10 +0000 (07:12 -0600)]
clean up cppcheck errors, warnings (#560)
* fix globalsat_sport cppcheck warnings.
* fix cppcheck warings in energympro.
* fix cppcheck ctunullpointer errors.
* fix cppcheck "error: Unmatched '}'" in shape.h.
* fix format string mismatches.
* fix cppcheck errors in tef_xml.
* fix cppcheck error in alan.
tsteven4 [Fri, 15 May 2020 22:16:42 +0000 (16:16 -0600)]
add dg200 test. (#558)
tsteven4 [Fri, 15 May 2020 15:04:10 +0000 (09:04 -0600)]
update shapelib to 1.5.0. (#559)
tsteven4 [Thu, 14 May 2020 17:19:24 +0000 (11:19 -0600)]
convert dg100 to Format class (#557)
* convert dg100 format to Format class.
* regenerate dependencies for dg100 format.
* whitespace
tsteven4 [Wed, 13 May 2020 15:01:50 +0000 (09:01 -0600)]
use qdatetime for dg100 format (#556)
* use QDateTime for dg-100 format.
* fix undefined behavior bug in dg100.
When sending the getconfig command memcpy would be invoked with
src == nullptr. The behavior of memcpy is undefined under these conditions,
even if the count is zero as it is in this case.
tsteven4 [Wed, 13 May 2020 13:22:58 +0000 (07:22 -0600)]
Add regression test capability for DG100/DG200 format. (#554)
* add regression test cabability for dg100 format.
The test compares any written data with the subsequent bytes in the
reference file. The test supplies any read data from the subsequent
bytes in the reference file.
A reference file can be created from the debug output at level 5
when reading an actual globalsat device:
egrep 'Receiving|Sent' "$log" | sed 's/^Sent: //' | sed 's/^Receiving //' \
| sed 's/RX:.*//' | xxd -r -p > "$log".bin
This creates a binary file from all the bytes transferred to or
from the device.
* update serialization reference files.
Even though the dg100 regression formats are internal, they still
get serialized. The GUI ignores them.
* Fix memory leak exposed by new dg100 regression test.
By using QList instead of homegrown dynarray16 class.
tsteven4 [Thu, 7 May 2020 12:31:39 +0000 (06:31 -0600)]
fix nmea writer date bug. (#553)
* fix nmea writer date bug.
dates before 2000 were written with a month off by one.
This also changes the behavior when the creation time is invalid.
Previously you would get data related to the unix epoch for the date
and time fields.
Now you get empty fields, i.e. ",,"
* fix magellan writer date bug.
This had the same bug as nmea. It had an additional bug
when it attempted to round the fractional part of a second. Rounding
can ripple all the way from the fractional part of a second to the year,
as is now demonstrated in the testcase.
Like nmea, magellan will now print empty fields if the creation time
is invalid.
* fix date bug in gpssim.
This is the same bug as in nmea, magproto.
tsteven4 [Mon, 4 May 2020 19:20:22 +0000 (13:20 -0600)]
convert unicsv to Format class (#552)
* convert unicsv to Format class.
Two bugs are fixed as well:
1. { "datum", fld_date, STR_ANY } is removed from the fields_def.
Note that the type is fld_date. I don't think this was ever used.
We do have the datum option to set the datum from the command line.
2. unicsv_fondle_header changed the fields_def type to fld_iso_time
if it was fld_time or fld_date and the value contained "iso".
However, fields_def isn't used outside unicsv_fondle_header, so
this had no effect.
* update dependencies.
tsteven4 [Fri, 1 May 2020 22:12:29 +0000 (16:12 -0600)]
fix windows issues with kml.h including windows.h (#551)
windows.h defines macros for max and min, which lead to compiler
warnings:
random.h(125): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file
kml hasn't needed windows.h since
ea82fa6d6
tsteven4 [Fri, 1 May 2020 13:03:31 +0000 (07:03 -0600)]
convert kml to Format class (#550)
* convert kml to Format class.
* update dependencies.
* restore kml real time postion writer functionality.
and have it produce valid kml.
Add a test case.
* correct new kml test reference file name.
tsteven4 [Fri, 1 May 2020 12:32:18 +0000 (06:32 -0600)]
add recoverymode and CRC checking to FIT reader. (#549)
* add recoverymode and CRC checking to FIT reader.
If present, the header CRC is checked.
The file CRC and length is checked.
A recoverymode option is added.
In the default mode we will fatal with:
a bad CRC,
a bad endian field,
an attempt to read when the data section doesn't have sufficient data,
an unexepected EOF.
In recovery mode when we encounter one of these errors we will abort
read processing and continue. This allows a more immediate cleaner
exit from the reader while still allowing any writer to use data that
was recovered previous to the read abort.
* add further explanation of recoverymode for document.
* make sure garmin fit messages are defined before being used.
tsteven4 [Tue, 28 Apr 2020 12:46:14 +0000 (06:46 -0600)]
sprintf/snprintf replacements (#548)
* fix g++ 9.3 warnings about snprintf.
These appear at -O2.
* handle garmin category conversion similar to garmin_fs.cc
* fix stmwpp includes under configure.
tsteven4 [Tue, 28 Apr 2020 12:42:48 +0000 (06:42 -0600)]
introduce xasprintf that accepts a QScopedPointer& (#547)
and use it to fix gcc 9 warnings in magproto, as well as other
possible string truncations/overflows.
tsteven4 [Fri, 24 Apr 2020 15:48:42 +0000 (09:48 -0600)]
migrate advanced travis build to focal. (#546)
and fix a new clazy warning. This warning shows up on focal
with clazy 1.6, but not on eoan with clazy 1.5.
tsteven4 [Tue, 21 Apr 2020 20:38:47 +0000 (14:38 -0600)]
convert garmin_fit to Format class. (#544)
Additionally, modernize fit reader:
use a container to hold field information for a message.
pass fit fields and message defs by const reference.
tsteven4 [Tue, 21 Apr 2020 00:32:02 +0000 (18:32 -0600)]
add missing include file to build.